package com.itheima.web.controller.system;

import com.github.pagehelper.PageInfo;
import com.itheima.service.system.ISysLogService;
import com.itheima.web.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/system/log")
public class LogController extends BaseController {

    @Autowired
    private ISysLogService sysLogService;

    @RequestMapping(value = "/list",name = "分页查询日志列表")
    public String list(@RequestParam(defaultValue = "1") int page) {

        String companyId = "1";

        PageInfo pageInfo = sysLogService.findAll(companyId, page);

        request.setAttribute("page", pageInfo);

        return "system/log/log-list";
    }


}
